Component({
    data: {
      selected: 0,
      color: "#000",
      selectedColor: "#920015",
      selectedBgColor:"#e4ebec",
      bgcolor:"#e4ebec",
      list: [
        {
          "pagePath": "/pages/index/index",
          "text": "协会介绍",
          "iconPath": "/icons/home.png",
          "selectedIconPath": "/icons/home_h.png"
        },
        {
            "pagePath": "/pages/my_shop/my_shop",
            "text": "优惠活动",
            "iconPath": "/icons/other.png",
            "selectedIconPath": "/icons/other_h.png"
        },
        {
          "pagePath": "/pages/my_shop_list/my_shop_list",
          "text": "会员企业",
          "iconPath": "/icons/qiye.png",
          "selectedIconPath": "/icons/qiye_h.png"
        },
        {
          "pagePath": "/pages/personData/personData",
          "text": "我的",
          "iconPath": "/icons/my.png",
          "selectedIconPath": "/icons/my_h.png"
        }
    ]
    },
    
    attached() {
    },
    methods: {
        switchTab(e) {
            const data = e.currentTarget.dataset
            const url = data.path
            wx.switchTab({url:url})

            this.setData({
              selected: data.index
            })
        }
    }
  })